package cn.tedu.egmvc3.controller;

import cn.tedu.egmvc3.pojo.AddressDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AddressController {
    @RequestMapping("/address/add")
    @ResponseBody
    public String add(String receiver, String address,String email,String mobile,String tag) {
        System.out.println(receiver+":"+address+":"+email+":"+mobile+":"+tag);
        return "添加地址成功";
    }
    @RequestMapping("/address/list")
    @ResponseBody
    public String select(String address) {
        System.out.println(address);
        return "查询地址列表";
    }
    @RequestMapping("/address/delete")
    @ResponseBody
    public String delete(String id) {
        System.out.println(id);
        return "删除地址成功";
    }
    @RequestMapping("/address/update")
    @ResponseBody
    public String update(AddressDto addressDto) {
        String id = addressDto.getId();
        String receiver = addressDto.getReceiver();
        String address = addressDto.getAddress();
        String email = addressDto.getEmail();
        String mobile = addressDto.getMobile();
        String tag = addressDto.getTag();
        System.out.println(id+":"+receiver+":"+address+":"+email+":"+mobile+":"+tag);
        System.out.println(addressDto);
        return "修改地址成功";
    }
}
354